package com.kevin.jsf;

/**
 * Created by loli on 2015/3/20.
 */
public class UserBean {
    private String name;
    private String password;
    private String errMessage;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {

        return password;
    }

    public void setErrMessage(String errMessage) {
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public String verify() {
        if (!name.equals("kevin") || !password.equals("123456")) {
            errMessage = "名称或密码错误";
            return "failure";
        } else {
            return "success";
        }
    }
}
